/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package instantmessengercpsc360.server;

import java.util.EventObject;

/**
 *
 * @author nicholas
 */
public class OpRecvEvent extends EventObject {

    public OpRecvEvent(ClientWrapper source, String msg) {
        super(source);
        opCode = msg.charAt(0);
        message = msg.substring(1);
    }

    public OpRecvEvent(ClientWrapper source, String message, char opCode) {
        super(source);
        this.message = message;
        this.opCode = opCode;
    }
    
    
    protected String message;
    protected char opCode;

    public String getMessage() {
        return message;
    }

    public char getOpCode() {
        return opCode;
    }

    @Override
    public ClientWrapper getSource() {
        return (ClientWrapper)source;
    }
}
